﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace be.brandweernijlen.adembescherming.Controllers
{
    public class DbController
    {
        public dbDataSet.TBL_ABDOCRow createNewAbDoc(dbDataSet dataset)
        {
                dbDataSet.TBL_ABDOCRow newDocRow = (dbDataSet.TBL_ABDOCRow)dataset.TBL_ABDOC.NewRow();

                newDocRow.CREATIONDATE = DateTime.Now;
                newDocRow.DOCNAME = "NOT IMPLEMENTED";
                newDocRow.FINAL = true;
    
                dataset.TBL_ABDOC.Rows.Add(newDocRow);

                return newDocRow;
        }


        public dbDataSet.TBL_ABDOCSTATUSRow createNewAbDocRow(dbDataSet dataset, int abdocId, int number, int pressure, int responsible, DateTime date)
        {
            dbDataSet.TBL_ABDOCSTATUSRow newDocStatusRow = (dbDataSet.TBL_ABDOCSTATUSRow)dataset.TBL_ABDOCSTATUS.NewRow();

            newDocStatusRow.ABDOC = abdocId;
            newDocStatusRow.NUMBER = number;
            newDocStatusRow.PRESSURE = pressure;
            newDocStatusRow.RESPONSIBLE = responsible;
            newDocStatusRow.CHANGEDATE = date;

            dataset.TBL_ABDOCSTATUS.Rows.Add(newDocStatusRow);

            return newDocStatusRow;
        }



    }
}
